package com.sicheng.metadata.juc.future;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author zsc
 * @version 1.0
 * @date 2022/3/31 20:07
 */
public class test {
    public static void main(String[] args) {
        System.out.println("测试的三个角为:30,60,90");
        System.out.println("测试的三个角为:70,180,200");
        System.out.println("测试的三个角为:60,70,50");
        System.out.println("测试的三个角为:110,30,40");

        ThreadPoolExecutor executor = new ThreadPoolExecutor(4,
                10,
                3L,
                TimeUnit.SECONDS,
                new ArrayBlockingQueue<>(10)
        );
        executor.submit(() -> System.out.println("hello"));
        executor.execute(() -> System.out.println("hello world"));
    }
}
